package VIEW;

import BEANS.ComboItem;
import CONTROLLERS.ReplacementController;
import UTIL.InputValidator;
import java.awt.event.KeyEvent;
import javax.swing.JComboBox;
import javax.swing.JOptionPane;
import javax.swing.JTable;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Belthazod
 */
public class ReplacementUI extends javax.swing.JPanel {
    private static ReplacementController replacementController;
    /**
     * Creates new form Returns
     */
    public ReplacementUI() {
        try{
        initComponents();
        replacementController = new ReplacementController(receiptNumberInput, 
                receiptTable, receiptTableHint, receiptTableScrollPane, 
                salesDateText, salesDateLabel, salesIDLabel, receiptNumberText, 
                receiptNumberLabel, dateReplacedText, dateReplacedDateChooser, 
                remarksText, remarksTextAreaScrollPane, remarksTextArea, 
                productsTableScrollPane, productsTable, historyTable,  
                inputQuantityDialog, inputQuantityTextField, acceptButton, 
                clearMark, searchInput, categoryFilterComboBox, 
                supplierFilterComboBox, changeSerialNumberDialog, 
                salesDate, replacementDate, warrantyDuration, 
            warrantyStatus, enterSerialNumberText, 
            newSerialNumberInput, warrantyOKButton, numerousQuantityText,
            defectiveButtonGroup, defectiveRadioButton, notDefectiveRadioButton,
            theseItemsAreText, enterQuantityText, searchButton, jLabel11, dateFrom, dateTo);
        replacementHistoryDialog.setLocationRelativeTo(null);
        InputValidator.enabler2(receiptTable, jButton3);
        InputValidator.enabler(productsTable, acceptButton);
        InputValidator.enabler(receiptTable, acceptButton);
        jLabel11.setVisible(false);
        }catch(NullPointerException npe){
            
        }
    
    }
//        private void enabler(){
//        b.setVisible(true);
//        c.setVisible(true);
//        d.setVisible(true);
//        e.setVisible(true);
//        f.setVisible(true);
//        g.setVisible(true);
//        h.setVisible(true);
//        i.setVisible(true);
//        k.setVisible(true);
//        }
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        changeSerialNumberDialog = new javax.swing.JDialog();
        newSerialNumberInput = new javax.swing.JTextField();
        warrantyOKButton = new javax.swing.JButton();
        jButton5 = new javax.swing.JButton();
        enterSerialNumberText = new javax.swing.JLabel();
        warrantyStatus = new javax.swing.JLabel();
        salesDate = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        warrantyDuration = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        replacementDate = new javax.swing.JLabel();
        inputQuantityDialog = new javax.swing.JDialog();
        enterQuantityText = new javax.swing.JLabel();
        inputQuantityTextField = new javax.swing.JTextField();
        jButton6 = new javax.swing.JButton();
        jButton7 = new javax.swing.JButton();
        numerousQuantityText = new javax.swing.JLabel();
        defectiveRadioButton = new javax.swing.JRadioButton();
        notDefectiveRadioButton = new javax.swing.JRadioButton();
        theseItemsAreText = new javax.swing.JLabel();
        defectiveButtonGroup = new javax.swing.ButtonGroup();
        replacementHistoryDialog = new javax.swing.JDialog();
        jScrollPane1 = new javax.swing.JScrollPane();
        historyTable = new javax.swing.JTable();
        jLabel3 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        dateFrom = new datechooser.beans.DateChooserCombo();
        dateTo = new datechooser.beans.DateChooserCombo();
        jLabel8 = new javax.swing.JLabel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        remarks = new javax.swing.JDialog();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTextArea1 = new javax.swing.JTextArea();
        jLabel6 = new javax.swing.JLabel();
        jButton8 = new javax.swing.JButton();
        jButton9 = new javax.swing.JButton();
        jDialog1 = new javax.swing.JDialog();
        jLabel11 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        a1 = new javax.swing.JLabel();
        receiptNumberInput = new javax.swing.JTextField();
        jButton2 = new javax.swing.JButton();
        receiptTableScrollPane = new javax.swing.JScrollPane();
        receiptTable = new javax.swing.JTable();
        receiptNumberText = new javax.swing.JLabel();
        receiptNumberLabel = new javax.swing.JLabel();
        salesDateText = new javax.swing.JLabel();
        dateReplacedDateChooser = new datechooser.beans.DateChooserCombo();
        clearMark = new javax.swing.JLabel();
        dateReplacedText = new javax.swing.JLabel();
        salesDateLabel = new javax.swing.JLabel();
        salesIDLabel = new javax.swing.JLabel();
        acceptButton = new javax.swing.JButton();
        remarksText = new javax.swing.JLabel();
        remarksTextAreaScrollPane = new javax.swing.JScrollPane();
        remarksTextArea = new javax.swing.JTextArea();
        productsTableScrollPane = new javax.swing.JScrollPane();
        productsTable = new javax.swing.JTable();
        jButton1 = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        receiptTableHint = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        supplierFilterComboBox = new javax.swing.JComboBox<ComboItem>();
        jLabel5 = new javax.swing.JLabel();
        categoryFilterComboBox = new javax.swing.JComboBox<ComboItem>();
        searchInput = new javax.swing.JTextField();
        searchButton = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        jSeparator1 = new javax.swing.JSeparator();

        changeSerialNumberDialog.setTitle("New Serial Number Input");
        changeSerialNumberDialog.setBounds(new java.awt.Rectangle(165, 155, 420, 250));
        changeSerialNumberDialog.setModalityType(java.awt.Dialog.ModalityType.APPLICATION_MODAL);

        newSerialNumberInput.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                newSerialNumberInputKeyPressed(evt);
            }
        });

        warrantyOKButton.setText("OK");
        warrantyOKButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                warrantyOKButtonActionPerformed(evt);
            }
        });

        jButton5.setText("Cancel");
        jButton5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton5ActionPerformed(evt);
            }
        });

        enterSerialNumberText.setText("Enter the Serial Number of the new item");

        warrantyStatus.setText("The item is still covered by warranty");

        salesDate.setText("jLabel9");

        jLabel9.setText("Date of Sale:");

        jLabel10.setText("Warranty Duration:");

        warrantyDuration.setText("jLabel11");

        jLabel12.setText("Date of replacement:");

        replacementDate.setText("jLabel13");

        javax.swing.GroupLayout changeSerialNumberDialogLayout = new javax.swing.GroupLayout(changeSerialNumberDialog.getContentPane());
        changeSerialNumberDialog.getContentPane().setLayout(changeSerialNumberDialogLayout);
        changeSerialNumberDialogLayout.setHorizontalGroup(
            changeSerialNumberDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(changeSerialNumberDialogLayout.createSequentialGroup()
                .addGroup(changeSerialNumberDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(changeSerialNumberDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(changeSerialNumberDialogLayout.createSequentialGroup()
                            .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(warrantyOKButton)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jButton5))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, changeSerialNumberDialogLayout.createSequentialGroup()
                            .addContainerGap()
                            .addComponent(newSerialNumberInput, javax.swing.GroupLayout.PREFERRED_SIZE, 370, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(changeSerialNumberDialogLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(changeSerialNumberDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(enterSerialNumberText, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(warrantyStatus)
                            .addGroup(changeSerialNumberDialogLayout.createSequentialGroup()
                                .addGroup(changeSerialNumberDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(jLabel10, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                .addGap(14, 14, 14)
                                .addGroup(changeSerialNumberDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(warrantyDuration, javax.swing.GroupLayout.DEFAULT_SIZE, 224, Short.MAX_VALUE)
                                    .addComponent(salesDate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                            .addGroup(changeSerialNumberDialogLayout.createSequentialGroup()
                                .addComponent(jLabel12)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(replacementDate)))))
                .addContainerGap(13, Short.MAX_VALUE))
        );
        changeSerialNumberDialogLayout.setVerticalGroup(
            changeSerialNumberDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, changeSerialNumberDialogLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(changeSerialNumberDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(salesDate)
                    .addComponent(jLabel9))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(changeSerialNumberDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel10)
                    .addComponent(warrantyDuration))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(changeSerialNumberDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(replacementDate))
                .addGap(18, 18, Short.MAX_VALUE)
                .addComponent(warrantyStatus)
                .addGap(5, 5, 5)
                .addComponent(enterSerialNumberText)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(newSerialNumberInput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(changeSerialNumberDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton5)
                    .addComponent(warrantyOKButton))
                .addContainerGap())
        );

        inputQuantityDialog.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        inputQuantityDialog.setTitle("Multiple Items detected");
        inputQuantityDialog.setBounds(new java.awt.Rectangle(165, 155, 420, 250));
        inputQuantityDialog.setModalityType(java.awt.Dialog.ModalityType.APPLICATION_MODAL);

        enterQuantityText.setText("Please enter the quantity being replaced.");

        jButton6.setText("OK");
        jButton6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton6ActionPerformed(evt);
            }
        });

        jButton7.setText("Cancel");
        jButton7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton7ActionPerformed(evt);
            }
        });

        numerousQuantityText.setText("The item being replaced is numerous.");

        defectiveButtonGroup.add(defectiveRadioButton);
        defectiveRadioButton.setText("Defective");

        defectiveButtonGroup.add(notDefectiveRadioButton);
        notDefectiveRadioButton.setText("Not Defective");

        theseItemsAreText.setText("These items are:");

        javax.swing.GroupLayout inputQuantityDialogLayout = new javax.swing.GroupLayout(inputQuantityDialog.getContentPane());
        inputQuantityDialog.getContentPane().setLayout(inputQuantityDialogLayout);
        inputQuantityDialogLayout.setHorizontalGroup(
            inputQuantityDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(inputQuantityDialogLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(inputQuantityDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(inputQuantityDialogLayout.createSequentialGroup()
                        .addGroup(inputQuantityDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(inputQuantityTextField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 349, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(enterQuantityText, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(numerousQuantityText, javax.swing.GroupLayout.Alignment.LEADING))
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(inputQuantityDialogLayout.createSequentialGroup()
                        .addComponent(theseItemsAreText)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(defectiveRadioButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(notDefectiveRadioButton)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, inputQuantityDialogLayout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton7)
                        .addContainerGap())))
        );
        inputQuantityDialogLayout.setVerticalGroup(
            inputQuantityDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(inputQuantityDialogLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(numerousQuantityText)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(enterQuantityText)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(inputQuantityTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(inputQuantityDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(theseItemsAreText)
                    .addComponent(defectiveRadioButton)
                    .addComponent(notDefectiveRadioButton))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(inputQuantityDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButton7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(35, 35, 35))
        );

        replacementHistoryDialog.setTitle("Replacement History");
        replacementHistoryDialog.setBounds(new java.awt.Rectangle(0, 0, 900, 600));
        replacementHistoryDialog.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        replacementHistoryDialog.setModalityType(java.awt.Dialog.ModalityType.APPLICATION_MODAL);

        historyTable.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        historyTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Date Replaced", "Replaced Item", "Replacement Item", "Replaced Quantity", "Remarks"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        historyTable.setRowHeight(20);
        jScrollPane1.setViewportView(historyTable);

        jLabel3.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
        jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel3.setText("Replacement History");

        jLabel7.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel7.setText("From:");

        dateFrom.setFormat(0);
        dateFrom.setWeekStyle(datechooser.view.WeekDaysStyle.FULL);
        dateFrom.addSelectionChangedListener(new datechooser.events.SelectionChangedListener() {
            public void onSelectionChange(datechooser.events.SelectionChangedEvent evt) {
                dateFromOnSelectionChange(evt);
            }
        });
        dateFrom.addCommitListener(new datechooser.events.CommitListener() {
            public void onCommit(datechooser.events.CommitEvent evt) {
                dateFromOnCommit(evt);
            }
        });

        dateTo.setWeekStyle(datechooser.view.WeekDaysStyle.FULL);
        dateTo.addSelectionChangedListener(new datechooser.events.SelectionChangedListener() {
            public void onSelectionChange(datechooser.events.SelectionChangedEvent evt) {
                dateToOnSelectionChange(evt);
            }
        });
        dateTo.addCommitListener(new datechooser.events.CommitListener() {
            public void onCommit(datechooser.events.CommitEvent evt) {
                dateToOnCommit(evt);
            }
        });

        jLabel8.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel8.setText("To:");

        javax.swing.GroupLayout replacementHistoryDialogLayout = new javax.swing.GroupLayout(replacementHistoryDialog.getContentPane());
        replacementHistoryDialog.getContentPane().setLayout(replacementHistoryDialogLayout);
        replacementHistoryDialogLayout.setHorizontalGroup(
            replacementHistoryDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(replacementHistoryDialogLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(replacementHistoryDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 880, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, replacementHistoryDialogLayout.createSequentialGroup()
                        .addComponent(jLabel7)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(dateFrom, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel8)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(dateTo, javax.swing.GroupLayout.PREFERRED_SIZE, 171, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        replacementHistoryDialogLayout.setVerticalGroup(
            replacementHistoryDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(replacementHistoryDialogLayout.createSequentialGroup()
                .addGap(13, 13, 13)
                .addComponent(jLabel3)
                .addGap(32, 32, 32)
                .addGroup(replacementHistoryDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(dateTo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, replacementHistoryDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(dateFrom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel7))
                    .addComponent(jLabel8, javax.swing.GroupLayout.Alignment.TRAILING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 275, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(81, Short.MAX_VALUE))
        );

        jTextArea1.setColumns(20);
        jTextArea1.setRows(5);
        jScrollPane2.setViewportView(jTextArea1);

        jLabel6.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel6.setText("Remarks");

        jButton8.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jButton8.setText("OK");

        jButton9.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jButton9.setText("Cancel");

        javax.swing.GroupLayout remarksLayout = new javax.swing.GroupLayout(remarks.getContentPane());
        remarks.getContentPane().setLayout(remarksLayout);
        remarksLayout.setHorizontalGroup(
            remarksLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(remarksLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(remarksLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 417, Short.MAX_VALUE)
                    .addGroup(remarksLayout.createSequentialGroup()
                        .addComponent(jLabel6)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, remarksLayout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(jButton8)
                        .addGap(18, 18, 18)
                        .addComponent(jButton9)))
                .addContainerGap())
        );
        remarksLayout.setVerticalGroup(
            remarksLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(remarksLayout.createSequentialGroup()
                .addGap(16, 16, 16)
                .addComponent(jLabel6)
                .addGap(18, 18, 18)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 189, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(remarksLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton8)
                    .addComponent(jButton9))
                .addContainerGap(32, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jDialog1Layout = new javax.swing.GroupLayout(jDialog1.getContentPane());
        jDialog1.getContentPane().setLayout(jDialog1Layout);
        jDialog1Layout.setHorizontalGroup(
            jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
        );
        jDialog1Layout.setVerticalGroup(
            jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
        );

        setBackground(new java.awt.Color(204, 204, 204));
        setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/UI ICONS/xmark.png"))); // NOI18N
        jLabel11.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel11MouseClicked(evt);
            }
        });
        add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(270, 80, 20, 20));

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setText("Replacement");
        add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 1070, 30));

        a1.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
        a1.setText("Receipt Number:");
        add(a1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 80, -1, -1));

        receiptNumberInput.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
        receiptNumberInput.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                receiptNumberInputActionPerformed(evt);
            }
        });
        receiptNumberInput.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                receiptNumberInputKeyPressed(evt);
            }
        });
        add(receiptNumberInput, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 80, 153, -1));

        jButton2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jButton2.setText("Search");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });
        add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 80, -1, -1));

        receiptTable.setAutoCreateRowSorter(true);
        receiptTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "product_id", "Product Name", "Serial Number", "Quantity"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        receiptTable.setRowHeight(20);
        receiptTable.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                receiptTableMousePressed(evt);
            }
        });
        receiptTableScrollPane.setViewportView(receiptTable);
        if (receiptTable.getColumnModel().getColumnCount() > 0) {
            receiptTable.getColumnModel().getColumn(0).setResizable(false);
            receiptTable.getColumnModel().getColumn(3).setMaxWidth(70);
        }

        add(receiptTableScrollPane, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 200, 510, 430));

        receiptNumberText.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
        receiptNumberText.setText("Receipt Number:");
        add(receiptNumberText, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 410, -1, -1));

        receiptNumberLabel.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
        add(receiptNumberLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 120, 230, 20));
        receiptNumberLabel.setVisible(false);

        salesDateText.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
        salesDateText.setText("Sales Date:");
        add(salesDateText, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 140, -1, -1));

        dateReplacedDateChooser.setNothingAllowed(false);
        add(dateReplacedDateChooser, new org.netbeans.lib.awtextra.AbsoluteConstraints(710, 70, 188, 25));

        clearMark.setIcon(new javax.swing.ImageIcon(getClass().getResource("/UI ICONS/xmark.png"))); // NOI18N
        clearMark.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                clearMarkMouseClicked(evt);
            }
        });
        add(clearMark, new org.netbeans.lib.awtextra.AbsoluteConstraints(970, 180, -1, -1));

        dateReplacedText.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
        dateReplacedText.setText("Date of Replacement:");
        add(dateReplacedText, new org.netbeans.lib.awtextra.AbsoluteConstraints(550, 70, -1, 25));

        salesDateLabel.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
        add(salesDateLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 140, 229, 20));
        salesDateLabel.setVisible(false);

        salesIDLabel.setText("jLabel9");
        add(salesIDLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 150, -1, -1));

        acceptButton.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        acceptButton.setText("Accept Product and Replace ");
        acceptButton.setEnabled(false);
        acceptButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                acceptButtonActionPerformed(evt);
            }
        });
        add(acceptButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(830, 610, 260, -1));

        remarksText.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
        remarksText.setText("Remarks:");
        add(remarksText, new org.netbeans.lib.awtextra.AbsoluteConstraints(550, 520, -1, -1));

        remarksTextArea.setColumns(20);
        remarksTextArea.setRows(5);
        remarksTextAreaScrollPane.setViewportView(remarksTextArea);

        add(remarksTextAreaScrollPane, new org.netbeans.lib.awtextra.AbsoluteConstraints(550, 540, 540, 60));

        productsTable.setAutoCreateRowSorter(true);
        productsTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "product_id", "Product name", "Supplier", "Category", "PhysicalCount"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        productsTableScrollPane.setViewportView(productsTable);
        if (productsTable.getColumnModel().getColumnCount() > 0) {
            productsTable.getColumnModel().getColumn(4).setMaxWidth(200);
        }

        add(productsTableScrollPane, new org.netbeans.lib.awtextra.AbsoluteConstraints(550, 210, 530, 300));

        jButton1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jButton1.setText("View Replacement History");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(880, 10, -1, -1));

        jLabel2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel2.setText("Products Selected:");
        add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(550, 180, -1, -1));

        receiptTableHint.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        receiptTableHint.setText("Products found based on the receipt number");
        add(receiptTableHint, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 170, -1, -1));

        jLabel4.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel4.setText("Supplier :");
        add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(550, 110, 60, -1));

        supplierFilterComboBox.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        supplierFilterComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        supplierFilterComboBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                supplierFilterComboBoxActionPerformed(evt);
            }
        });
        add(supplierFilterComboBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(620, 110, 160, -1));

        jLabel5.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel5.setText("Category:");
        add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(550, 140, -1, -1));

        categoryFilterComboBox.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        categoryFilterComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        categoryFilterComboBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                categoryFilterComboBoxActionPerformed(evt);
            }
        });
        add(categoryFilterComboBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(620, 140, 160, -1));

        searchInput.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        searchInput.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                searchInputKeyPressed(evt);
            }
        });
        add(searchInput, new org.netbeans.lib.awtextra.AbsoluteConstraints(830, 170, 160, 30));

        searchButton.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        searchButton.setText("Search");
        searchButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                searchButtonActionPerformed(evt);
            }
        });
        add(searchButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(1000, 170, -1, 30));

        jButton3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jButton3.setText("Clear");
        jButton3.setEnabled(false);
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });
        add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 170, 70, -1));

        jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL);
        add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(530, 40, 10, 630));
    }// </editor-fold>//GEN-END:initComponents

    private void warrantyOKButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_warrantyOKButtonActionPerformed
        if(!newSerialNumberInput.getText().trim().equals("")){
            replacementController.acceptItemWithWarranty();
        }else{
            
            JOptionPane.showMessageDialog(null, "The new serial number cannot be empty. Please enter the new serial number for replacement.","New Serial Number is empty", JOptionPane.ERROR_MESSAGE);
        }
    }//GEN-LAST:event_warrantyOKButtonActionPerformed

    private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
        changeSerialNumberDialog.dispose();
    }//GEN-LAST:event_jButton5ActionPerformed

    private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed
        replacementController.acceptItem();
    }//GEN-LAST:event_jButton6ActionPerformed

    private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton7ActionPerformed
        inputQuantityDialog.setVisible(false);
    }//GEN-LAST:event_jButton7ActionPerformed

    private void receiptNumberInputKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_receiptNumberInputKeyPressed
        if (evt.getKeyCode()== KeyEvent.VK_ENTER)
	{
            jButton2.doClick();
	}
    }//GEN-LAST:event_receiptNumberInputKeyPressed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        replacementController.searchReceiptNumber();
        InputValidator.enabler2(receiptTable, jButton3);
        InputValidator.enabler(productsTable, acceptButton);
        InputValidator.enabler(receiptTable, acceptButton);
    }//GEN-LAST:event_jButton2ActionPerformed

    private void acceptButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_acceptButtonActionPerformed
        replacementController.validateReplacementInfo();
        InputValidator.enabler2(receiptTable, jButton3);
        InputValidator.enabler(productsTable, acceptButton);
        InputValidator.enabler(receiptTable, acceptButton);
    }//GEN-LAST:event_acceptButtonActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        replacementController.replacementReport();
        replacementHistoryDialog.setVisible(true);
    }//GEN-LAST:event_jButton1ActionPerformed

    private void supplierFilterComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_supplierFilterComboBoxActionPerformed
        replacementController.filterProducts();
    }//GEN-LAST:event_supplierFilterComboBoxActionPerformed

    private void categoryFilterComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_categoryFilterComboBoxActionPerformed
        replacementController.filterProducts();
    }//GEN-LAST:event_categoryFilterComboBoxActionPerformed

    private void searchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchButtonActionPerformed
        replacementController.searchProduct();
    }//GEN-LAST:event_searchButtonActionPerformed

    private void clearMarkMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clearMarkMouseClicked
        replacementController.clearSearch();
        InputValidator.enabler2(receiptTable, jButton3);
    }//GEN-LAST:event_clearMarkMouseClicked

    private void receiptTableMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_receiptTableMousePressed
        replacementController.sortIfHasWarranty();
    }//GEN-LAST:event_receiptTableMousePressed

    private void receiptNumberInputActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_receiptNumberInputActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_receiptNumberInputActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        replacementController.clearList();
        InputValidator.enabler2(receiptTable, jButton3);
        InputValidator.enabler(productsTable, acceptButton);
        InputValidator.enabler(receiptTable, acceptButton);
    }//GEN-LAST:event_jButton3ActionPerformed

    private void newSerialNumberInputKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_newSerialNumberInputKeyPressed
        if (evt.getKeyCode()==KeyEvent.VK_ENTER){
            warrantyOKButton.doClick();
        }
    }//GEN-LAST:event_newSerialNumberInputKeyPressed

    private void searchInputKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_searchInputKeyPressed
        if (evt.getKeyCode()==KeyEvent.VK_ENTER){
            searchButton.doClick();
        }
    }//GEN-LAST:event_searchInputKeyPressed

    private void dateFromOnCommit(datechooser.events.CommitEvent evt) {//GEN-FIRST:event_dateFromOnCommit
        replacementController.replacementReport();
    }//GEN-LAST:event_dateFromOnCommit

    private void dateFromOnSelectionChange(datechooser.events.SelectionChangedEvent evt) {//GEN-FIRST:event_dateFromOnSelectionChange
        replacementController.replacementReport();
    }//GEN-LAST:event_dateFromOnSelectionChange

    private void dateToOnSelectionChange(datechooser.events.SelectionChangedEvent evt) {//GEN-FIRST:event_dateToOnSelectionChange
        replacementController.replacementReport();
    }//GEN-LAST:event_dateToOnSelectionChange

    private void dateToOnCommit(datechooser.events.CommitEvent evt) {//GEN-FIRST:event_dateToOnCommit
        replacementController.replacementReport();
    }//GEN-LAST:event_dateToOnCommit

    private void jLabel11MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel11MouseClicked
        replacementController.clear();
    }//GEN-LAST:event_jLabel11MouseClicked
    
    public static void updateReturnsHistoryTable(){
        replacementController.replacementReport();
    }
    public static JTable getProductsTable(){
        return productsTable;
    }
    
    public static JComboBox<ComboItem> getSupplierComboBox(){
        return supplierFilterComboBox;
    }
    
    public static JComboBox<ComboItem> getCategoryComboBox(){
        return categoryFilterComboBox;
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel a1;
    private javax.swing.JButton acceptButton;
    private static javax.swing.JComboBox<ComboItem> categoryFilterComboBox;
    private static javax.swing.JDialog changeSerialNumberDialog;
    private javax.swing.JLabel clearMark;
    private datechooser.beans.DateChooserCombo dateFrom;
    private datechooser.beans.DateChooserCombo dateReplacedDateChooser;
    private javax.swing.JLabel dateReplacedText;
    private datechooser.beans.DateChooserCombo dateTo;
    private javax.swing.ButtonGroup defectiveButtonGroup;
    private javax.swing.JRadioButton defectiveRadioButton;
    private javax.swing.JLabel enterQuantityText;
    private javax.swing.JLabel enterSerialNumberText;
    private javax.swing.JTable historyTable;
    private static javax.swing.JDialog inputQuantityDialog;
    private javax.swing.JTextField inputQuantityTextField;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton5;
    private javax.swing.JButton jButton6;
    private javax.swing.JButton jButton7;
    private javax.swing.JButton jButton8;
    private javax.swing.JButton jButton9;
    private javax.swing.JDialog jDialog1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTextArea jTextArea1;
    private javax.swing.JTextField newSerialNumberInput;
    private javax.swing.JRadioButton notDefectiveRadioButton;
    private javax.swing.JLabel numerousQuantityText;
    private static javax.swing.JTable productsTable;
    private javax.swing.JScrollPane productsTableScrollPane;
    private javax.swing.JTextField receiptNumberInput;
    private javax.swing.JLabel receiptNumberLabel;
    private javax.swing.JLabel receiptNumberText;
    private javax.swing.JTable receiptTable;
    private javax.swing.JLabel receiptTableHint;
    private javax.swing.JScrollPane receiptTableScrollPane;
    private javax.swing.JDialog remarks;
    private javax.swing.JLabel remarksText;
    private javax.swing.JTextArea remarksTextArea;
    private javax.swing.JScrollPane remarksTextAreaScrollPane;
    private javax.swing.JLabel replacementDate;
    private javax.swing.JDialog replacementHistoryDialog;
    private javax.swing.JLabel salesDate;
    private javax.swing.JLabel salesDateLabel;
    private javax.swing.JLabel salesDateText;
    private javax.swing.JLabel salesIDLabel;
    private javax.swing.JButton searchButton;
    private javax.swing.JTextField searchInput;
    private static javax.swing.JComboBox<ComboItem> supplierFilterComboBox;
    private javax.swing.JLabel theseItemsAreText;
    private javax.swing.JLabel warrantyDuration;
    private javax.swing.JButton warrantyOKButton;
    private javax.swing.JLabel warrantyStatus;
    // End of variables declaration//GEN-END:variables
}
